package com.ws.encapsulation1.exer2;
/*

在PersonTest类中实例化Person类的对象b，调
用setAge()和getAge()方法，体会Java的封装性.

 */
public class PersonTest {
    public static void main(String[] args) {

        Person person = new Person();

        person.setAge(12);
        System.out.println("年龄为：" + person.getAge());

        Person person1 = new Person(22, "Tom");
        System.out.println("name = " + person1.getName() + ", age = " + person1.getAge());
    }

}
